<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0 user-scalable=no">
        <meta name="format-detection" content="telephone=no">
        <title>我的&#32418;&#x5305; {php echo !empty($theme['USERCOMPANYNAME'])?$theme['USERCOMPANYNAME']:$_G['companyname'];}</title>
        <link rel="stylesheet" type="text/css" href="{$_G['URL']['APP_RESOURCE']}pmcss/foxui.min.css">
        <link rel="stylesheet" href="{$_G['URL']['APP_RESOURCE']}pmcss/rank.css">
        <style type="text/css">
            body {
                position: absolute;;
                max-width: 750px;  margin:auto;
            }
            .fui-navbar {
                max-width:750px;
            }
            .fui-navbar,.fui-footer  {
                max-width:750px;
            }
            .fui-page.fui-page-from-center-to-left,
            .fui-page-group.fui-page-from-center-to-left,
            .fui-page.fui-page-from-center-to-right,
            .fui-page-group.fui-page-from-center-to-right,
            .fui-page.fui-page-from-right-to-center,
            .fui-page-group.fui-page-from-right-to-center,
            .fui-page.fui-page-from-left-to-center,
            .fui-page-group.fui-page-from-left-to-center {
                -webkit-animation: pageFromCenterToRight 0ms forwards;
                animation: pageFromCenterToRight 0ms forwards;
            }
            .page-rank .ranklist .main .line .col {height: 2.5rem; width: 57%; font-size: 0.7rem; color: #666;  line-height: 2.5rem; border-right: 1px solid #e5e5e5; text-align: left; padding: 0.25rem 0.5rem;}
            .page-rank .ranklist .main .line .col:last-child {width: 25%; text-align: center; padding: 0; border: 0;}
            .page-rank .ranklist .main .line .col:nth-child(3) {width: 12%;font-size: 0.6rem; text-align: center; padding: 8 0 0 0;line-height: 1rem;}
            .page-rank .ranklist .main .line .col:nth-child(1) {width: 10%;text-align: center; padding: 0;}
            .page-rank .ranklist .main .line .col .name {
                height: 2rem;
                line-height: 1rem;
                padding-left: 0.2rem;
                font-size: 0.6rem;
                white-space: nowrap;
                text-overflow: ellipsis;
                overflow: hidden;
                -webkit-text-overflow: ellipsis;
            }
            .page-rank .ranklist .main .line .col .name2 {
                height: 2rem;
                line-height: 1rem;
                padding-left: 0.2rem;
                font-size: 0.5rem;
                white-space: nowrap;
                text-overflow: ellipsis;
                overflow: hidden;
                -webkit-text-overflow: ellipsis;
            }
            .page-rank .rankhead .head .child.gold span {
                color: #fb3e27;
                font-size: 1.2rem;
                line-height: 1.5rem;
            }
            .tips{
                font-size: 0.6rem;
                line-height: 1rem;
                text-align: right;
                width: 98%;
                color: #FF6A5C;
            }
            .page-rank .ranklist .main .line .col.index-2 {
                color: #FF6A5C;
                font-size: 0.6rem;
                text-align: center;
                padding: 8 0 0 0;
                line-height: 1rem;
            }
            .page-rank .rankhead .head .child .textnew {
                color: inherit;
                font-size: 0.5rem;
                text-align: left;
            }

        </style>
        <style>.danmu {display: none;opacity: 0;}</style>
        <style> 
        .cover{ 
        display:none; 
        position:fixed; 
        z-index:1; 
        top:0; 
        left:0; 
        width:100%; 
        height:100%; 
        background:rgba(0, 0, 0, 0.8); 
        } 
        .coverShow{ 
        display:none; 
        position:fixed; 
        z-index:2;
        margin-top:30%; 
        } 
        </style>
    </head>

    <body ontouchstart="">
        <div class="fui-page-group ">css
            <div class="fui-page page-rank yellow fui-page-current" style="" id="fui-page-1484552738384">
                <div class="fui-content">
                    <div class="rankhead">
                        <div class="head">
                            <div class="child">
                                <img src="{$fans['avatar']}" style="width:40px; height:40px; border-radius:50%; overflow:hidden;margin-bottom: 5px;border:1px solid #f7db05;">
                                <p class="text">{$fans['nickname']}</p>
                            </div>
                            <div class="child gold">
                                <span>{$total}</span>
                                <p class="text" style="margin-top: 3px;">我的&#32418;&#x5305;</p>
                            </div>
                            <!-- <div class="child" id="tixian" money="{$fans['hbketi']}">
                                                                    <div class="btn" style="border-color:#f7db05;font-size: 14px;line-height: 30px;height: 30px;padding-left: 8px;padding-right: 8px;">
        余额:{$commssum2}</div>
                                    <p class="textnew" id="t_txt">红包到帐：{$totalsuccess}元</p>
                                    <p class="textnew" id="t_txt">提现失败：{$totalfail}元</p>
                                                            </div> -->
                            {if ($system['autored']==2) }
                            <div class="child" style="margin-top: -20px;">
                                <span>{$totalfail}</span>
                                <p class="text">未提现</p>
                                <div class="btn" onclick="sdtixian()" style="border-color:#f7db05;font-size: 14px;height: 30px;"><div style="margin-top: -5px;">提现</div></div>
                            </div>
                            {else}
                            <div class="child" style="margin-top: -20px;">
                                <span>{$totalfail}</span>
                                <p class="text"></p>
                                <div class="btn" style="border-color:#f7db05;font-size: 14px;height: 30px;"><div style="margin-top: -5px;">未提现</div></div>
                            </div>
                            {/if}
                        </div>
                        {if $config['hbtixian']>0}
                       <div class="title">您的&#32418;&#x5305;余额满{$config['hbtixian']}元,即可提现</div>
                                            </div>
                        {/if}
                    <div class="rankline">
                        <div class="left"></div>
                        <div class="right"></div>
                        <div class="center"></div>
                    </div>
                    <div class="ranklist">
                        <div class="main">
                            <div class="line title">
                                <div class="col">序号</div>
                                <div class="col">来自于</div>
                                <div class="col">类型</div>
                                <div class="col">&#32418;&#x5305;金额</div>
                            </div>
                            <div id="container">
                                 <div style="text-align: center;">
                                    <p class="text" style="color: gray;font-size: 14px;">暂无数据</p>
                                </div>
                            </div>
                            <div id="btn-more" class="btn block btn-danger" tag ="1">&#28857;击加载更多</div>
                        </div>
                        <div class="footer" style="width:100%; display: block;  background: #ffffff; ">
                            <p style="text-align: center; padding: 0px; margin: 0px;"><span style="color: rgb(255, 0, 0); font-size: 12px;">{$theme['jubf']} {$theme['themetel']}</span></p><p style="text-align: center; padding: 0px; margin: 0px;"></p>
                        </div>
                    </div>
                    {if !empty($theme['kfewm'])}
                    <div class="content">
                        <img src="{$_G['attachurl']}{$theme['kfewm']}" alt="" class="lazy">
                    </div>
                    {/if}
                    {if !empty($theme['mobile'])}
                        <div class="footer" style="width:100%; height:65px; display: block; ">
                            <p style="text-align: center; padding: 0px; margin: 0px;"><a style="font-size:14px; color: #ff0000;" href="tel:{$theme['mobile']}">{$theme['jubf']}客服电话:{$theme['mobile']}</a>
                            </p>
                            {if ($system['autored']==2) }
                            <p style="text-align: center; padding: 0px; margin: 0px;"><a style="font-size:12px; color: #252525;" href="tel:{$theme['mobile']}">注：自助提现单次最大额度为500元，每天可提6次</a>
                            </p>
                            <p style="text-align: center; padding: 0px; margin: 0px;"><a style="font-size:12px; color: #252525;" href="tel:{$theme['mobile']}">超500元需联系客服人工提现</a>
                            </p>
                            {/if}
                            <p style="text-align: center; padding: 0px; margin: 0px;"></p>
                        </div>
                    {/if}
                        <div class="footer" style="width:100%; height:35px; display: block; ">
                            <p style="text-align: center; padding: 0px; margin: 0px;"><a style="font-size:12px; color: #252525;" href="{$system['s']['yixuanurl']}">{$system['s']['yixuanjishu']}</a>
                            </p>
                            <p style="text-align: center; padding: 0px; margin: 0px;"></p>
                        </div>
                        <div class="footer" style="height:50px">
                        </div>
                    <span style="display:none"></span>
                </div>
            </div>
        </div>
        <style>
        .class_footer {background: rgba(252,209,8,0.95); position: fixed; width: 100%; height: 52px;  left: 0; bottom: 0; z-index: 95;}
        .class_fright {float: right; width: 100%; text-align: center; line-height: 52px; background: #f44; color: #fff; font-size: 24px; font-weight: 600;}
        </style>
        <div class="class_footer">

            <a href="javascript:history.go(-1);" class="class_fright"><i style="-webkit-animation: blink .75s linear infinite;">返回活动页面</i></a>
        </div>
        <script src="{$_G['URL']['APP_RESOURCE']}pmcss/mui.min.js"></script>
        <script src="{$_G['URL']['APP_RESOURCE']}pmcss/jquery-3.1.0.js"></script>
        <script>
            mui.init({
                swipeBack:true //启用右滑&#20851;闭功能
            });


            function sdtixian(){ 
                    $.ajax({
                        url:"/{php echo createMobileUrl("mycomm",array('op'=>'tixian','themeid'=>$themeid));}",
                        type : 'post',
                        dataType:'json',  
                        data : {},
                        success : function(data){
                            if (data.code == 0) {
                                alert(data.errormsg);                                
                            } else{
                                alert(data.errormsg);
                                location.reload();
                            }
                        },
                        error:function(){
                            alert("您的网络有点小问题");
                        }
                    });
            }
        </script>
        <script type="text/javascript">
        var code = "8174128569958166696796620286313123977226752255607061990820593849";
            $(document).ready(function(){
                var ranknum = 0;
                var pg = 1;
                var opt = '';
                $.ajax({
                        url:'/{php echo createMobileUrl("mycomm",array('op'=>'getcomm','themeid'=>$themeid));}',
                        type : 'post',
                        dataType:'json',  
                        data : {
                            pg:pg,
                            code:code,
                        },
                        success : function(data){
                            code = data.scode;
                            if (data.code == 0) {
                                $("#btn-more").text("没有收到红包");
                                $("#btn-more").attr("tag","0");
                            } else{
                                if (data.isend == 1) {
                                    $("#btn-more").text("我是有底线的，没数据了");
                                    $("#btn-more").attr("tag","0");
                                    $("#btn-more").hide();
                                } else{
                                    $("#btn-more").text("点击加载更多");
                                    $("#btn-more").attr("tag","1");
                                    pg = pg + 1;
                                }
                                var spe = data.data;
                                for (var i = 0; i < spe.length; i++) {
                                    if (spe[i].fee>0) {ranknum = ranknum + 1;}
                                    opt += '<div class="line">';
                                    if (spe[i].fee>0) {
                                    opt += '<div class="col">' + ranknum+'</div>';
                                    }else{
                                    opt += '<div class="col"></div>';
                                    }
                                    opt += '<div class="col">';
                                        opt += '<div class="face"><img src="' + spe[i].avatar +'"></div>';
                                        opt += '<div class="name">' + spe[i].nickname +'</br><span class="name2">' + spe[i].time +'</span></div>';
                                    opt += '</div>';
                                    opt += '<div class="col">' + spe[i].leixing +'</div>';
                                    if (spe[i].comm==1 && spe[i].status==0) {
                                    opt += '<div class="col index-2">' + spe[i].fee +'元<br>未提现</div>';
                                    }else if (spe[i].comm==1 && spe[i].status==1) {
                                    opt += '<div class="col index-1">' + spe[i].fee +'元</div>';
                                    }else if (spe[i].comm==2 && spe[i].status==1) {
                                    opt += '<div class="col ">' + spe[i].fee +'元</div>';
                                    }else{
                                    opt += '<div class="col ">' + spe[i].fee +'元</div>';
                                    }
                                    opt += '</div>'; 
                                    opt += '</div>';   
                                    if (spe[i].comm==1 && spe[i].status==0 && spe[i].msg!=null && spe[i].msg!='待客户提现') {
                                    opt += '<div class="line">';
                                    opt += '<div class="tips">提现失败:' + spe[i].msg +'</div>';
                                    opt += '</div>'; 
                                    }
                                }
                                $("#container").html(opt);  
                            }
                        },
                        error:function(){
                            alert("您的网络有点小问题");
                        }
                }); 
                $("#btn-more").click(function(){
                    if ($(this).attr("tag") == 1) {
                        var opt = $("#container").html();
                        $.ajax({
                                url:'/{php echo createMobileUrl("mycomm",array('op'=>'getcomm','themeid'=>$themeid));}',
                                type : 'post',
                                dataType:'json',  
                                data : {
                                    pg:pg,
                                    code:code,
                                },
                                success : function(data){
                                    code = data.scode;
                                    if (data.code == 0) {
                                        $("#btn-more").text("还没有收到红包;");
                                        $("#btn-more").attr("tag","0");
                                    } else{
                                        if (data.isend == 1) {
                                            $("#btn-more").text("我是有底线的，没数据了");
                                            $("#btn-more").attr("tag","0");
                                            $("#btn-more").hide();
                                        } else{
                                            $("#btn-more").text("点击加载更多");
                                            $("#btn-more").attr("tag","1");
                                            pg = pg + 1;
                                        }
                                        var spe = data.data;
                                        for (var i = 0; i < spe.length; i++) {
                                            if (spe[i].fee>0) {ranknum = ranknum + 1;}
                                            opt += '<div class="line">';
                                            if (spe[i].fee>0) {
                                            opt += '<div class="col">' + ranknum+'</div>';
                                            }else{
                                            opt += '<div class="col"></div>';
                                            }
                                            opt += '<div class="col">';
                                                opt += '<div class="face"><img src="' + spe[i].avatar +'"></div>';
                                                opt += '<div class="name">' + spe[i].nickname +'</br><span class="name2">' + spe[i].time +'</span></div>';
                                            opt += '</div>';
                                            opt += '<div class="col">' + spe[i].leixing +'</div>';
                                            if (spe[i].comm==1 && spe[i].status==0) {
                                            opt += '<div class="col index-2">' + spe[i].fee +'元</div>';
                                            }else if (spe[i].comm==1 && spe[i].status==1) {
                                            opt += '<div class="col index-1">' + spe[i].fee +'元</div>';
                                            }else if (spe[i].comm==2 && spe[i].status==1) {
                                            opt += '<div class="col ">' + spe[i].fee +'元</div>';
                                            }else{
                                            opt += '<div class="col ">' + spe[i].fee +'未结算</div>';
                                            }
                                            opt += '</div>'; 
                                            opt += '</div>';   
                                            if (spe[i].comm==1 && spe[i].status==0) {
                                            opt += '<div class="line">';
                                            opt += '<div class="tips">提现失败:' + spe[i].msg +'</div>';
                                            opt += '</div>'; 
                                            }
                                        }
                                        $("#container").html(opt);  
                                    }
                                },
                                error:function(){
                                    alert("您的网络有点小问题");
                                }
                        });
                    } else{
                        alert("已无更多数据");
                    }
                });

                
                    $("#tixian").click(function(){                        
                            {if $fans['status'] ==2}
                                alert("员工不可以提现");
                            {/if}
                    });
                
                $("#queren").click(function(){
                    /*var real_name = $(".collect").val();
                    var phone = $("#phone").val();
                    var course = $("#course").val();*/
                    var names = new Array()
                    names[0] = $("#name1");
                    names[1] = $("#name2");
                    names[2] = $("#name3");
                    names[3] = $("#name4");
                    for (var i = 0; i < names.length; i++) {
                        if (typeof(names[i].val()) != 'undefined') {
                            var phoneNumReg = /^(((13[0-9]{1})|(15[0-9]{1})|(17[0-9]{1})|(18[0-9]{1}))+\d{8})$/;
                            var test = 1; 
                            if (names[i].attr('c_type') == 1) {
                                if (names[i].val() == "") {
                                    test = 0;
                                    alert(names[i].attr('c_name')+"不可为空");
                                    i = 4;
                                } 
                            }
                            if (names[i].attr('c_type') == 2) {
                                if (names[i].val() == "") {
                                    test = 0;
                                    alert(names[i].attr('c_name')+"不可为空");
                                    i = 4;
                                } else {
                                    if (!phoneNumReg.exec(names[i].val())) {
                                        test = 0;
                                        alert("请输入真实"+names[i].attr('c_name'));
                                        i = 4;
                                    }
                                }
                            }
                        }
                    }
                    if (test == 1) {
                        $("#cover2").css("display","none");
                        $("#coverShow2").css("display","none");
                        $("#cover").css("display","block");
                        $("#coverShow").css("display","block");
                        $.ajax({
                                url:"./index.php?i=6&c=entry&do=data&m=tech_redpacketn",
                                type : 'post',
                                dataType:'json',  
                                data : {
                                    name1:$("#name1").val(),
                                    name2:$("#name2").val(),
                                    name3:$("#name3").val(),
                                    name4:$("#name4").val(),
                                    code:code,
                                },
                                success : function(data){
                                    code = data.scode;
                                    if (data.code == 0) {
                                        alert(data.data);
                                    } else{
                                        tijiao();
                                    }
                                },
                                error:function(){
                                    alert("您的网络有点小问题");
                                    $("#cover2").css("display","none");
                                    $("#coverShow2").css("display","none");
                                }
                        });
                    }

                });
                $("#quxiao2").click(function(){
                    $("#cover2").css("display","none");
                    $("#coverShow2").css("display","none");
                });
                $("#quxiao").click(function(){
                    $("#cover1").css("display","none");
                    $("#coverShow1").css("display","none");
                }); 
               function formatDateTime3(time, format){  
                  var t = new Date(time);  
                  var tf = function(i){return (i < 10 ? '0' : '') + i};  
                  return format.replace(/yyyy|MM|dd|HH|mm|ss/g, function(a){  
                      switch(a){  
                          case 'yyyy':  
                              return tf(t.getFullYear());  
                              break;  
                          case 'MM':  
                              return tf(t.getMonth() + 1);  
                              break;  
                          case 'mm':  
                              return tf(t.getMinutes());  
                              break;  
                          case 'dd':  
                              return tf(t.getDate());  
                              break;  
                          case 'HH':  
                              return tf(t.getHours());  
                              break;  
                          case 'ss':  
                              return tf(t.getSeconds());  
                              break;  
                      }  
                  })  
              };
                function tijiao(){
                                        var tixian = $("#tixian");
                    if ($(tixian).attr("money") >= 100) {
                        $("#cover").css("display","block");
                        $("#coverShow").css("display","block");
                        var money = $(tixian).attr("money");
                        $.ajax({
                                url:"./index.php?i=6&c=entry&do=tixian&m=tech_redpacketn",
                                type : 'post',
                                dataType:'json',  
                                data : {
                                    code:code,
                                    money:money,
                                },
                                success : function(data){
//                              	alert('111');
                                	console.log(data);
                                    code = data.scode;
                                    $("#cover").css("display","none");
                                    $("#coverShow").css("display","none");
                                    if (data.code == 0) {
//                                      console.log(data.data);
                                        alert(data.message);
                                        
                                    } else{
                                                                                alert(data.data);
                                        console.log(data.data);
                                                                                $("#tixian").attr("money", data.data);
                                        $("#t_txt").text("可提现：0元");
                                    }
                                },
                                error:function(){
                                    alert("您的网络有点小问题");
                                    $("#cover").css("display","none");
                                    $("#coverShow").css("display","none");
                                }
                        });
                    } else{
                        alert("最小提现金额为：1元");
                    }
                                    }
            });
        </script>
    </body>

<script type="text/javascript" src="https://css2019.yixuan.net/baom/template/js/jquery.min.js"></script>
<script src="https://res.wx.qq.com/open/js/jweixin-1.0.0.js" type="text/javascript"></script>
  <script>
        var appid = '{$_G['platform']['jssdkconfig']['appId']}';
        var timestamp = '{$_G['platform']['jssdkconfig']['timestamp']}';
        var nonceStr = '{$_G['platform']['jssdkconfig']['nonceStr']}';
        var signature = '{$_G['platform']['jssdkconfig']['signature']}';

        wx.config({
            debug: false,
            appId: appid,
            timestamp: timestamp,
            nonceStr: nonceStr,
            signature: signature,
            jsApiList: [
                'checkJsApi',
                'hideOptionMenu',
                
            ]
        });


        wx.ready(function () {
          wx.hideOptionMenu();
          // 提交金额
          $(".verifyshare").click(function() {
            var themeid = $("#themeid").val();
          {php $zidiyiurl = "/" . createMobileUrl("verifyshare");}
          
              $.ajax({
               type:'POST',
               data:{themeid:themeid},
               url:'{php echo $zidiyiurl;}',
               success:function(data){
                  var json = eval("("+data+")");
                  if(json.errcode == 0){
                  alertToUrl(json.msg,window.location.href);
                  }else{   
                  tips(json.errmsg);
                  }
               }
             });
          });
          $(".verifyorder").click(function() {
            var themeid = $("#themeid").val();
          {php $zidiyiurl = "/" . createMobileUrl("verifyorder");}
          
              $.ajax({
               type:'POST',
               data:{themeid:themeid},
               url:'{php echo $zidiyiurl;}',
               success:function(data){
                  var json = eval("("+data+")");
                  if(json.errcode == 0){
                  alertToUrl(json.msg,window.location.href);
                  }else{   
                  tips(json.errmsg);
                  }
               }
             });
          });
          
        });

        wx.error(function (res) {
        });
    


    </script>
</html>